<footer>
    <p>天佑青春 激荡年华</p>
</footer>

<div id="loadingToast" class="weui_loading_toast" style="display:none;">
    <div class="weui_mask_transparent"></div>
    <div class="weui_toast">
        <div class="weui_loading">
            <!-- :) -->
            <div class="weui_loading_leaf weui_loading_leaf_0"></div>
            <div class="weui_loading_leaf weui_loading_leaf_1"></div>
            <div class="weui_loading_leaf weui_loading_leaf_2"></div>
            <div class="weui_loading_leaf weui_loading_leaf_3"></div>
            <div class="weui_loading_leaf weui_loading_leaf_4"></div>
            <div class="weui_loading_leaf weui_loading_leaf_5"></div>
            <div class="weui_loading_leaf weui_loading_leaf_6"></div>
            <div class="weui_loading_leaf weui_loading_leaf_7"></div>
            <div class="weui_loading_leaf weui_loading_leaf_8"></div>
            <div class="weui_loading_leaf weui_loading_leaf_9"></div>
            <div class="weui_loading_leaf weui_loading_leaf_10"></div>
            <div class="weui_loading_leaf weui_loading_leaf_11"></div>
        </div>
        <p class="weui_toast_content">数据加载中</p>
    </div>
</div>

<script src="__STATIC__/js/jquery-weui.min.js"></script>
<script src="__STATIC__/js/jquery.pjax.js"></script>
<script src="__STATIC__/js/jquery.cookie.js"></script>
<script type="text/javascript">
// pjax支持检测
if ($.support.pjax) {
    $(document).pjax('a', '.contentLayer', {
        fragment: '#detail-content',
        scrollTo: false,
        timeout: 1650
    });

    $(document).on('pjax:send', function() {
        // 在pjax发送请求时，显示loading动画层
        $('#loadingToast').show();

    });
    $(document).on('pjax:complete', function() {
        $('#loadingToast').hide();
    });

    // 后退监听
    $(document).on('pjax:popstate', function() {
        if(location.pathname == "/") {
            $('body').attr('id', 'page-index-index');
        }
    });

    $(".closeBtn").on('click', function() {
        window.history.go(-1);
    });

    // 按下ESC键时返回
    $(window).keydown(function(event) {
        if (event.which == 27 && $(".popupLayer").css('display') == "block") {
            window.history.go(-1);
        }
    });
}
</script>